<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/purchase.js" ></script>
<script language="javascript">
  function onstsubmit()
	{
		$('#expressform').modal('hide');	
		$('#attributeform').submit();
	}
</script>
<title>质检处理</title>
<body class="withvernav">
<div class="bodywrapper">
{{include file='/public/orderleft.tpl'}}
<div class="centercontent">
  <div class="pageheader notab">
    <h1 class="pagetitle">扫描入库</h1>
    <span class="pagedesc"><br></span>
    
  </div>
  <!--pageheader-->
  <div id="contentwrapper" class="contentwrapper">
    <div id="basicform" class="subcontent"> 
      <!--搜索栏-->
      <div> </div>
      <div style="clear: both"></div>
      <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
    </div>
    <form class="stdform stdform2" method="get" id="search" action="/purchase/purchaselist">
      <div class="tableoptions">
       
      
        </select>
        <select name="status" id="status">
          <option value="">-状态-</option>
          <option value="1" {{if $status=='1'}} selected{{/if}}>新订单</option>
          <option value="2" {{if $status=='2'}} selected{{/if}}>已支付</option>
          <option value="3" {{if $status=='3'}} selected{{/if}}>配货中</option>
          <option value="4" {{if $status=='4'}} selected{{/if}}>已发货</option>
          <option value="5" {{if $status=='5'}} selected{{/if}}>已完成</option>
          <option value="6" {{if $status=='6'}} selected{{/if}}>作废</option>
        </select>
        <select name="ispay">
          <option value="">-支付情况-</option>
          <option value="1" {{if $ispay==1}} selected{{/if}}>请求付款</option><option value="2" {{if $ispay==2}} selected{{/if}}>未支付</option>
          <option value="3" {{if $ispay==3}} selected{{/if}}>已支付</option>
      
			
        </select>
        <select name="ty" id="searchtype" class="selection" style="width:100px;" >
          <option value="1" {{if $ty==1}} selected{{/if}}>订单时间</option>
          <option value="2" {{if $ty==2}} selected{{/if}}>导入时间</option>
          <option value="3" {{if $ty==3}} selected{{/if}}>发货时间</option>
        </select>
        <input type="text"  name="starttime" value="{{$starttime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
        -
        <input type="text"  name="endtime" value="{{$endtime}} " onClick="WdatePicker({dateFmt:'yyyy-MM-dd '})" class="width100 hasDatepicker" />
        <select name="filtertype">
          <option value="">-查询条件-</option>
          <option value="order_sn" {{if $filtertype=='order_sn'}} selected{{/if}}>订单编号</option>
          <option value="tradeid" {{if $filtertype=='tradeid'}} selected{{/if}}>交易单号</option>
          <!-- <option value="sontradeid">子交易单号</option>
					 <option value="transactionid">transactionid</option>-->
          <option value="productname" {{if $filtertype=='productname'}} selected{{/if}}>商品名称</option>
          <option value="productid" {{if $filtertype=='productid'}} selected{{/if}}>商品编号</option>
          <option value="customerid" {{if $filtertype=='customerid'}} selected{{/if}}>买家帐号(精确)</option>
          <option value="custome" {{if $filtertype=='custome'}} selected{{/if}}>买家帐号</option>
          <option value="consignee" {{if $filtertype=='consignee'}} selected{{/if}}>客户姓名</option>
          <option value="email"  {{if $filtertype=='email'}} selected{{/if}}>客户Email</option>
          <option value="tel" {{if $filtertype=='tel'}} selected{{/if}}>客户电话</option>
          <option value="paypalmail" {{if $filtertype=='paypalmail'}} selected{{/if}}>Paypal ID</option>
          <option value="shipping_number" {{if $filtertype=='shipping_number'}} selected{{/if}}>货运单号</option>
          <option value="country" {{if $filtertype=='country'}} selected{{/if}}>国家(英)</option>
          <option value="country_cn" {{if $filtertype=='country_cn'}} selected{{/if}}>国家(中)</option>
          <option value="city"  {{if $filtertype=='city'}} selected{{/if}}>买家城市</option>
          <option value="zipcode"  {{if $filtertype=='zipcode'}} selected{{/if}}>邮政编码</option>
        </select>
        :
        <input type="text" name="kw" id="kw" class="width200" value="{{$kw}}" placeholder="关键词" />
        &nbsp;
        <button class="btn btn-primary" id="searchbtn">Search</button>
        <input type='hidden' name='if_csv' id='if_csv'>
        <input type='hidden' name='isow' id='isow'>
        <input type='hidden' name='isno' id='isno'>
        <input type='hidden' name='que' id='que'>
      </div>
    </form>
    <!--搜索栏结束-->
    <table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="table-layout: fixed;">
      <thead>
        <tr class="lbbt">
          <td width="3%"  bgcolor="#FEFFF1"><a onClick="allSelect('ppid[]')">全选</a></td>
          <td width="8%" bgcolor="#FEFFF1">订单编号</td>
          <td  bgcolor="#FEFFF1">预计入库时间</td>
          <td  bgcolor="#FEFFF1">采购人</td>
          <td  bgcolor="#FEFFF1">采购总价</td>
          <td  bgcolor="#FEFFF1">状态</td>
           <td  bgcolor="#FEFFF1">申请时间</td>
          <td  bgcolor="#FEFFF1">支付情况</td>
         
          <td width="15%"  bgcolor="#FEFFF1" >操作</td>
        </tr>
      </thead>
      <tbody >
      
      {{foreach from=$orderlist item=li key=key}}
      <tr>
        <td ><input name="ppid[]" type="checkbox" class="none" id="ppid[]" value="{{$li.order_sn}}" /></td>
        <td valign="middle" style="position:relative;"><a href="/purchase/ordermod/{{$li.id}}/show" target="_blank"><font color="#6666FF">{{$li.orderstockid}}</font></a></td>
        <td valign="middle">{{$li.waittime}}</td>
        <td valign="middle">{{$li.createuser}}</td>
        <td style="position:relative;">{{$li.allmoney}}</td>
        <td valign="middle">
        {{if $li.status==1}}申请中{{/if}}
         {{if $li.status==2 && $li.chkflag==0}}待质检{{/if}}
         {{if $li.status==2 && $li.chkflag==1 && $li.rkflag==0}}待入库{{/if}}
         {{if $li.status==2 && $li.chkflag==1 && $li.rkflag==1}}入库完成{{/if}}
        </td>
         <td class="cz">{{$li.opertime}}</td>
        <td valign="middle">
        
        
          
           {{if $li.ps==2}}
      
     
        已支付
          {{/if}}
          
           </td>
       
        <td class="cz">
         {{if $li.chkflag==1 && $li.status==2 && $li.rkflag==0}}
           <a href="/purchase/instock/{{$li.id}}" ><img src="/fuman/images/rk.jpg" onClick="confirmzhijian({{$li.id}})" style="cursor:pointer"></a> </span>
         {{/if}}
         
         
          <span>
          
          <a href="/purchase/ordermod/{{$li.id}}/show" target="_blank"><img src="/fuman/images/ckk.png" /> </a></span>
                    
        
        </td>
      </tr>
      {{/foreach}}
        </tbody>
      
    </table>
    <div class="page">{{$pageList}} 计{{$total}}条记录，共{{$totalpage}}页</div>
  </div>
</div>

<!-- 模态框（Modal）显示填写货运号 -->
  <form  method="post" name="saveform" id="saveform" action="/purchase/ajaxbutton?op=savekd">
  <input type="hidden" name="orderid" id="orderid">
  <div class="modal fade" id="showmabangorder" tabindex="-1" role="dialog" aria-labelledby="sshowmabangorder" aria-hidden="true">
    <div class="modal-dialog" style="width:50%;">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" 
               aria-hidden="true">× </button>
          <h4 class="modal-title" id="sshowmabangorder"> 请填写货运单号  </h4>
        </div>
        <div class="modal-body">
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
            
          <tbody id="showmabangid"></tbody>
          </table>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" 
               data-dismiss="modal"> 关闭 </button>
            <button type="button" class="btn btn-primary"  onclick="atmangban()"> 提交 </button>
          </div>
        </div>
        <!-- /.modal-content --> 
      </div>
      <!-- /.modal-dialog --> 
    </div>
  </div>
  <!-- /.modal -->
  </form>

</body>
</html>